home *** CD-ROM | disk | FTP | other *** search
- #!/usr/bin/perl5
-
- require "/usr/OnRamp/lib/OnRamp.pm";
-
- ($list, $owner, $list_query) = split(/:/, $ENV{'QUERY_STRING'});
- $root_dir = "$document_root/apps/majordomo/$list";
- $list_root = "/usr/freeware/lib/majordomo/lists";
- $url_root = $ENV{'SERVER_URL'} . "/apps/majordomo/$list";
- $dummy = $root_dir . "/dummy";
- $num_file = "$root_dir/num";
- $list_link = "major-info.cgi?$ENV{'QUERY_STRING'}:l";
-
- if (-e $num_file) {
- open(IN, "< $num_file");
- $num = <IN>;
- close(IN);
- } else { $num = 0; }
-
- $file = $list_root . "/$list" . ".creation";
- if (-e $file) {
- open(IN, "< $file");
- $c_date = <IN>;
- close(IN);
- }
-
- $file = $list_root . "/$list" . ".config";
- if (-e $file) {
- open(IN, "< $file");
- while(<IN>) {
- @items = split(/\s+/);
- if ($items[0] eq "moderate") { $moderate = $items[2]; }
- if ($items[0] eq "subscribe_policy") { $sub_pol = $items[2]; }
- }
- }
-
- $file = $list_root . "/$list";
- if (-e $file) {
- open(IN, "< $file");
- while(<IN>) { chop $_; push(@subs, $_); }
- close(IN);
- $n_sub = $#subs + 1;
- }
-
- $file = $list_root . "/$list" . ".info";
- if (-e $file) {
- open(IN, "< $file");
- while(<IN>) { $info .= $_; }
- close(IN);
- $info =~ s/\n/<br>\n/g;
- }
-
- print "Content-type: text/html\n\n";
- &make_page;
-
- sub make_page {
- print "<body bgcolor=#FFFFFF>\n";
- $str = "<h2>$list info<br></h2>";
-
- if ($num > 0) {
- $str .= "<a href=\"majordomo/$list/date.html\">[date]</a>\n"
- . "<a href=\"majordomo/$list/subject.html\">[subj]</a>\n"
- . "<a href=\"majordomo/$list/author.html\">[auth]</a>\n";
- }
-
- print "<table width=100%>",
- "<tr><th align=left>$str</th>\n",
- "<th align=right><a href=\"/newsplash.shtml\">",
- "<img height=55 width=57 border=0 src=/apps/home.gif></a>\n",
- " <a href=\"Apps.shtml\">",
- "<img height=55 width=57 border=0 src=/apps/back.gif></a>",
- "  <a href=\"/apps/Apps.major.cgi\">",
- "<img height=60 width=80 border=0 src=\"/apps/major.gif\">",
- "</tr></table><br><br>\n";
-
- print "<i>$message</i>\n";
- print "<center><table width=550>\n"
- . "<tr><th align=left>Owner:<td><a href=\"mailto:$owner\">$owner</a></td></tr>\n"
- . "<tr><th align=left>Moderated:<td><i>$moderate</i></td></tr>\n"
- . "<tr><th align=left>Subscription policy:<td><i>$sub_pol</i></td></tr>\n"
- . "<tr><th align=left>Creation date:<td><i>$c_date</i></td></tr>\n"
- . "<tr><th align=left>Number of letters:<td><i>$num</i></td></tr>\n";
-
- print "<tr><th align=left>Number of subscribers:<td><i>";
- if ($list_query eq "l" || $sub_pol eq "closed") {
- print $n_sub;
- } else {
- print "$n_sub (<a href=$list_link>list subscibers</a>)";
- }
- print "</i></td></tr>\n";
- if ($list_query eq "l") {
- foreach (@subs) {
- print "<tr><td align=left>  $_</td></tr>\n";
- }
- }
-
- print "<tr><th align=left valign=top>Info:<td><i>$info</i></td></tr>\n"
- . "</table></center>\n";
- }
-